<?php

class Cat_Tags_Php_Attr_Prop_Setter extends Cat_Processor_Monkey_TagBase
{
	function getOutput()
	{
		$args = $this->getArgs();
			
		$defaults = array(
			'name' => 'name',
			'value' => 'value'
		);
		
		$args = Cat_Common::withDefaults( $args, $defaults );
		
		$schema = array(
			0 => 'string',
			'name' => 'string',
			'value' => 'string'
		);
		
		Cat_Common::checkArgs( $args, $schema );
		
		$code = "public function __set(\${$args['name']}, \${$args['value']})\n    {\n        @@ php.attr.prop.setter.impl {$args[0]}; name={$args['name']}; value={$args['value']} @@    }";
		
		return $code;
	}
}